import { defineConfig } from 'vite'
import vue from '@vitejs/plugin-vue'
import tailwindcss from '@tailwindcss/vite'
// https://vite.dev/config/
export default defineConfig({
  plugins: [vue(),tailwindcss()],
  server: {
    port: 8866,
    host: true,
    proxy: {
      '/xz_server': {
        target: 'http://127.0.0.1:7001',
        changeOrigin: true,
        ws: true, // 添加这一行
        rewrite: (path) => path.replace(/^\/xz_server/, '')
      }
    }
  },
})
